feat: add concurrent upscale (MAPCO-3529) - #119
Merged
Conversation
shimoncohen
requested changes
Oct 23, 2023
| Tile? lastTile = null; | ||
| coordsList.Add(new Coord(i, baseTileX, baseTileY)); | ||
| } | ||
| var response = this.InternalGetExistingTile(coordsList.ToArray()); |
Collaborator
There was a problem hiding this comment.
Instead of adding this function please move it's code to here and remove it.
shimoncohen
requested changes
Oct 24, 2023
| } | ||
|
|
||
| // Async method to request all tiles that can be used for "upscale" concurrently | ||
| var responseOfGetlastTileAsync = async delegate (Coord[] coordsArray) |
Collaborator
There was a problem hiding this comment.
Rename to getUpscaleTiles.
Comment on lines
+235
to
+245
| if (zOrderToTileDictionary.IsEmpty) | ||
| { | ||
| break; | ||
| return null; | ||
| } | ||
| } | ||
| string message = lastTile == null ? "null" : $"z:{lastTile.Z}, x:{lastTile.X}, y:{lastTile.Y}"; | ||
| this._logger.LogDebug($"[{MethodBase.GetCurrentMethod().Name}] ended, lastTile: {message}"); | ||
| return lastTile; | ||
| // Get first valid tile that can be upscaled | ||
| List<KeyValuePair<int, Tile?>> list = new List<KeyValuePair<int, Tile?>>(zOrderToTileDictionary.ToArray()); | ||
| var orderedList = list.OrderBy(kvp => kvp.Key); | ||
| Tile? lastTile = orderedList.Last().Value; | ||
| string message = lastTile == null ? "null" : $"z:{lastTile.Z}, x:{lastTile.X}, y:{lastTile.Y}"; | ||
| this._logger.LogDebug($"[{MethodBase.GetCurrentMethod().Name}] ended, lastTile: {message}"); | ||
| return lastTile; |
Collaborator
There was a problem hiding this comment.
Move outside to the function.
shimoncohen
approved these changes
Oct 24, 2023
|
|
||
| // Go over zoom levels until a tile is found (may not find tile) | ||
| // Define all tiles coordinates that needs to be requested for upscale | ||
| List<Coord> coordsList = new List<Coord>(MaxZoomRead - (MaxZoomRead - coords.Z)); |
Collaborator
There was a problem hiding this comment.
Please change to coords.Z as limit.
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support concurrent get tiles for upscale